< previous page page_714 next page >

Page 714
Custom Control Naming Conventions
An important part of any Visual Basic program is the controls placed on a form. All similar custom controls should have a common prefix. For example, text boxes should start with txt, and labels should start with lbl. Table A.2 shows the recommended control name prefixes for most of the controls in the Visual Basic environment. These prefixes are consistent with those documented in the Visual Basic Programmers Guide.
Table A.2 Custom Control Naming Conventions.
PrefixControl TypeExample
aniAnimation buttonaniMailBox
cboCombo boxcboEnglish
chkCheck boxchkReadOnly
clpPicture clipclpToolbar
comCommunicationscomFax
datData controldatBiblio
dbcData-aware combo boxdbcStates
dbgData-aware griddbgLineItems
dblData-aware list boxdblCustomers
dirDirectory list boxdirSource
dlgCommon dialog controldlgFileOpen
drvDrive list boxdrvTarget
filFile list boxfilSource
fraFramefraLanguage
frmFormfrmEntry
gauGaugegauStatus
gpbGroup pushbuttongpbChannel
graGraphgraRevenue
grdGridgrdPrices
hsbHorizontal scrollbarhsbVolume
imgImageimgIcon
imlImageList controlimlPictures

(table continued on next page)

 
< previous page page_714 next page >

If you like this book, buy it!